home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pyr_placekindling.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  123 lines

  1. # Jones 3D Cog Script
  2. #
  3. # pyr_placekindling.cog
  4. #    
  5. # Put kindling on the lightbox platform
  6. #
  7. # [RKD]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13. message startup
  14. message activated
  15.  
  16. # world things
  17. thing    kindling    nolink
  18. thing    player        nolink    local
  19. thing    kindlingbox
  20.  
  21. # indy's saylines
  22. sound    there=inxj108.wav    local
  23. sound    nothing=inxj218.wav    local
  24.  
  25. # sfx
  26. sound    putwood=gen_machete_hit_wood.wav    local
  27.  
  28. # subroutines
  29. flex    startscene=0.0        local
  30. flex    endscene=0.0        local
  31. flex    fixcams=0.0            local
  32. end
  33.  
  34. code
  35. startup:
  36.     #make kindling invisible    
  37.     SetThingFlags(kindling, 0x10);
  38.     return;
  39.  
  40. activated:
  41. # ---> kindlingbox (larger invisible standin for kindling)
  42.  
  43.     if (GetSenderRef() != kindlingbox) return;
  44.     
  45.     player = GetLocalPlayerThing();
  46.     
  47.     if ((GetThingFlags(kindling) & 0x10) && (GetCurItem(player) != 92))
  48.     {
  49.         # prepare the player and play voicelines
  50.         if (MakeMeStop() == -1) return;
  51.         DeselectWeaponWait(player);
  52.         
  53.         StartCutscene(1);
  54.         
  55.         SetExtCamOffset('0.07 -0.13 0.13');
  56.         sleep(.5);
  57.  
  58.         PlayVoice(player, nothing, 1, 1);
  59.  
  60.         sleep(.5);
  61.         RestoreExtCam();
  62.         ClearActorFlags(player, 0x200000);
  63.         EndCutscene();
  64.  
  65.         return;
  66.     }
  67.     
  68.     if (GetCurItem(player) == 92)
  69.     {
  70.         # prepare the player
  71.         if (MakeMeStop() == -1) return;
  72.         DeselectWeaponWait(player);
  73.         
  74.         call startscene;
  75.         
  76.         #place kindling
  77.         PlayMode(player, 60, 0);
  78.         Sleep(.5);
  79.         
  80.         # make kindling visible
  81.         PlaySoundThing(putwood, kindling, 1, .1, 10, 0);
  82.         ClearThingFlags(kindling, 0x10);
  83.         ChangeInv(player, 92, -1);
  84.  
  85.         PlayVoice(player, there, 1, 1);
  86.     
  87.         sleep(.5);
  88.         
  89.         call endscene;
  90.     }
  91.  
  92.     return;
  93.  
  94.  
  95. startscene:
  96.     call fixcams;
  97.  
  98.     StartCutscene(1);
  99.     SetActorFlags(player, 0x200000);
  100.             
  101.     SetExtCamOffset('0.07 -0.13 0.13');
  102.  
  103.     return;
  104.                 
  105. endscene:
  106.     call fixcams;
  107.     
  108.     ClearActorFlags(player, 0x200000);
  109.     
  110.     EndCutscene();
  111.     return;
  112.     
  113. fixcams:
  114.     #reset camera settings
  115.     ResetCameraFOV(0, 0);
  116.     SetCameraPosInterp(2, 0);
  117.     SetCameraLookInterp(2, 0);
  118.     RestoreExtCam();
  119.     return;
  120.     
  121.  
  122. end
  123.